package com.kaifamiao.N0720;

public class Node8 {

    public static void main(String[] args) {

        int[] num = new int[]{1, 2, 5, 3, 7, 5, 3, 8, 6, 1, 9};
        //选择排序
        for (int i = 0; i < num.length - 1; i++) {
            int x = i;
            for (int j = x + 1; j < num.length; j++) {
                if (num[x] > num[j]) {
                    x = j;
                }
            }
            int q = num[x];
            num[x] = num[i];
            num[i] = q;
        }
        for (int i = 0; i < num.length; i++) {
            System.out.println(num[i]);
        }
    }
}
